Integrand size = 31, antiderivative size = 266 \[ \int \frac {\cos (c+d x) \left (A+C \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^3} \, dx=-\frac {3 A b x}{a^4}-\frac {\left (15 a^2 A b^4-6 A b^6-2 a^6 C-a^4 b^2 (12 A+C)\right ) \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a^4 (a-b)^{5/2} (a+b)^{5/2} d}-\frac {\left (11 a^2 A b^2-6 A b^4-a^4 (2 A-3 C)\right ) \sin (c+d x)}{2 a^3 \left (a^2-b^2\right )^2 d}+\frac {\left (A b^2+a^2 C\right ) \sin (c+d x)}{2 a \left (a^2-b^2\right ) d (a+b \sec (c+d x))^2}-\frac {\left (3 A b^4-2 a^4 C-a^2 b^2 (6 A+C)\right ) \sin (c+d x)}{2 a^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))} \]
-3*A*b*x/a^4-(15*a^2*A*b^4-6*A*b^6-2*a^6*C-a^4*b^2*(12*A+C))*arctanh((a-b) ^(1/2)*tan(1/2*d*x+1/2*c)/(a+b)^(1/2))/a^4/(a-b)^(5/2)/(a+b)^(5/2)/d-1/2*( 11*A*a^2*b^2-6*A*b^4-a^4*(2*A-3*C))*sin(d*x+c)/a^3/(a^2-b^2)^2/d+1/2*(A*b^ 2+C*a^2)*sin(d*x+c)/a/(a^2-b^2)/d/(a+b*sec(d*x+c))^2-1/2*(3*A*b^4-2*a^4*C- a^2*b^2*(6*A+C))*sin(d*x+c)/a^2/(a^2-b^2)^2/d/(a+b*sec(d*x+c))
Result contains complex when optimal does not.
Time = 5.94 (sec) , antiderivative size = 902, normalized size of antiderivative = 3.39 \[ \int \frac {\cos (c+d x) \left (A+C \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^3} \, dx=\frac {(b+a \cos (c+d x)) \sec (c+d x) \left (A+C \sec ^2(c+d x)\right ) \left (-\frac {8 i \left (-15 a^2 A b^4+6 A b^6+2 a^6 C+a^4 b^2 (12 A+C)\right ) \arctan \left (\frac {(i \cos (c)+\sin (c)) \left (a \sin (c)+(-b+a \cos (c)) \tan \left (\frac {d x}{2}\right )\right )}{\sqrt {a^2-b^2} \sqrt {(\cos (c)-i \sin (c))^2}}\right ) (b+a \cos (c+d x))^2 (\cos (c)-i \sin (c))}{\left (a^2-b^2\right )^{5/2} \sqrt {(\cos (c)-i \sin (c))^2}}+\frac {\sec (c) \left (-12 A b \left (a^2-b^2\right )^2 \left (a^2+2 b^2\right ) d x \cos (c)-24 a A b^2 \left (a^2-b^2\right )^2 d x \cos (d x)-24 a^5 A b^2 d x \cos (2 c+d x)+48 a^3 A b^4 d x \cos (2 c+d x)-24 a A b^6 d x \cos (2 c+d x)-6 a^6 A b d x \cos (c+2 d x)+12 a^4 A b^3 d x \cos (c+2 d x)-6 a^2 A b^5 d x \cos (c+2 d x)-6 a^6 A b d x \cos (3 c+2 d x)+12 a^4 A b^3 d x \cos (3 c+2 d x)-6 a^2 A b^5 d x \cos (3 c+2 d x)+16 a^4 A b^3 \sin (c)+22 a^2 A b^5 \sin (c)-20 A b^7 \sin (c)+8 a^6 b C \sin (c)+14 a^4 b^3 C \sin (c)-4 a^2 b^5 C \sin (c)+a^7 A \sin (d x)+2 a^5 A b^2 \sin (d x)-53 a^3 A b^4 \sin (d x)+32 a A b^6 \sin (d x)-22 a^5 b^2 C \sin (d x)+4 a^3 b^4 C \sin (d x)+a^7 A \sin (2 c+d x)+2 a^5 A b^2 \sin (2 c+d x)+11 a^3 A b^4 \sin (2 c+d x)-8 a A b^6 \sin (2 c+d x)+10 a^5 b^2 C \sin (2 c+d x)-4 a^3 b^4 C \sin (2 c+d x)+4 a^6 A b \sin (c+2 d x)-24 a^4 A b^3 \sin (c+2 d x)+14 a^2 A b^5 \sin (c+2 d x)-8 a^6 b C \sin (c+2 d x)+2 a^4 b^3 C \sin (c+2 d x)+4 a^6 A b \sin (3 c+2 d x)-8 a^4 A b^3 \sin (3 c+2 d x)+4 a^2 A b^5 \sin (3 c+2 d x)+a^7 A \sin (2 c+3 d x)-2 a^5 A b^2 \sin (2 c+3 d x)+a^3 A b^4 \sin (2 c+3 d x)+a^7 A \sin (4 c+3 d x)-2 a^5 A b^2 \sin (4 c+3 d x)+a^3 A b^4 \sin (4 c+3 d x)\right )}{\left (a^2-b^2\right )^2}\right )}{4 a^4 d (A+2 C+A \cos (2 (c+d x))) (a+b \sec (c+d x))^3} \]
((b + a*Cos[c + d*x])*Sec[c + d*x]*(A + C*Sec[c + d*x]^2)*(((-8*I)*(-15*a^ 2*A*b^4 + 6*A*b^6 + 2*a^6*C + a^4*b^2*(12*A + C))*ArcTan[((I*Cos[c] + Sin[ c])*(a*Sin[c] + (-b + a*Cos[c])*Tan[(d*x)/2]))/(Sqrt[a^2 - b^2]*Sqrt[(Cos[ c] - I*Sin[c])^2])]*(b + a*Cos[c + d*x])^2*(Cos[c] - I*Sin[c]))/((a^2 - b^ 2)^(5/2)*Sqrt[(Cos[c] - I*Sin[c])^2]) + (Sec[c]*(-12*A*b*(a^2 - b^2)^2*(a^ 2 + 2*b^2)*d*x*Cos[c] - 24*a*A*b^2*(a^2 - b^2)^2*d*x*Cos[d*x] - 24*a^5*A*b ^2*d*x*Cos[2*c + d*x] + 48*a^3*A*b^4*d*x*Cos[2*c + d*x] - 24*a*A*b^6*d*x*C os[2*c + d*x] - 6*a^6*A*b*d*x*Cos[c + 2*d*x] + 12*a^4*A*b^3*d*x*Cos[c + 2* d*x] - 6*a^2*A*b^5*d*x*Cos[c + 2*d*x] - 6*a^6*A*b*d*x*Cos[3*c + 2*d*x] + 1 2*a^4*A*b^3*d*x*Cos[3*c + 2*d*x] - 6*a^2*A*b^5*d*x*Cos[3*c + 2*d*x] + 16*a ^4*A*b^3*Sin[c] + 22*a^2*A*b^5*Sin[c] - 20*A*b^7*Sin[c] + 8*a^6*b*C*Sin[c] + 14*a^4*b^3*C*Sin[c] - 4*a^2*b^5*C*Sin[c] + a^7*A*Sin[d*x] + 2*a^5*A*b^2 *Sin[d*x] - 53*a^3*A*b^4*Sin[d*x] + 32*a*A*b^6*Sin[d*x] - 22*a^5*b^2*C*Sin [d*x] + 4*a^3*b^4*C*Sin[d*x] + a^7*A*Sin[2*c + d*x] + 2*a^5*A*b^2*Sin[2*c + d*x] + 11*a^3*A*b^4*Sin[2*c + d*x] - 8*a*A*b^6*Sin[2*c + d*x] + 10*a^5*b ^2*C*Sin[2*c + d*x] - 4*a^3*b^4*C*Sin[2*c + d*x] + 4*a^6*A*b*Sin[c + 2*d*x ] - 24*a^4*A*b^3*Sin[c + 2*d*x] + 14*a^2*A*b^5*Sin[c + 2*d*x] - 8*a^6*b*C* Sin[c + 2*d*x] + 2*a^4*b^3*C*Sin[c + 2*d*x] + 4*a^6*A*b*Sin[3*c + 2*d*x] - 8*a^4*A*b^3*Sin[3*c + 2*d*x] + 4*a^2*A*b^5*Sin[3*c + 2*d*x] + a^7*A*Sin[2 *c + 3*d*x] - 2*a^5*A*b^2*Sin[2*c + 3*d*x] + a^3*A*b^4*Sin[2*c + 3*d*x]...
Time = 1.81 (sec) , antiderivative size = 300, normalized size of antiderivative = 1.13, number of steps used = 16, number of rules used = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.484, Rules used = {3042, 4589, 3042, 4588, 25, 3042, 4592, 25, 3042, 4407, 3042, 4318, 3042, 3138, 221}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cos (c+d x) \left (A+C \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^3} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {A+C \csc \left (c+d x+\frac {\pi }{2}\right )^2}{\csc \left (c+d x+\frac {\pi }{2}\right ) \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^3}dx\) |
\(\Big \downarrow \) 4589 |
\(\displaystyle \frac {\left (a^2 C+A b^2\right ) \sin (c+d x)}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}-\frac {\int \frac {\cos (c+d x) \left (-\left ((2 A-C) a^2\right )+2 b (A+C) \sec (c+d x) a+3 A b^2-2 \left (C a^2+A b^2\right ) \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^2}dx}{2 a \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\left (a^2 C+A b^2\right ) \sin (c+d x)}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}-\frac {\int \frac {-\left ((2 A-C) a^2\right )+2 b (A+C) \csc \left (c+d x+\frac {\pi }{2}\right ) a+3 A b^2-2 \left (C a^2+A b^2\right ) \csc \left (c+d x+\frac {\pi }{2}\right )^2}{\csc \left (c+d x+\frac {\pi }{2}\right ) \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^2}dx}{2 a \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 4588 |
\(\displaystyle \frac {\left (a^2 C+A b^2\right ) \sin (c+d x)}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}-\frac {\frac {\left (-2 a^4 C-a^2 b^2 (6 A+C)+3 A b^4\right ) \sin (c+d x)}{a d \left (a^2-b^2\right ) (a+b \sec (c+d x))}-\frac {\int -\frac {\cos (c+d x) \left (-\left ((2 A-3 C) a^4\right )+11 A b^2 a^2-b \left (A b^2-a^2 (4 A+3 C)\right ) \sec (c+d x) a-6 A b^4+\left (-2 C a^4-b^2 (6 A+C) a^2+3 A b^4\right ) \sec ^2(c+d x)\right )}{a+b \sec (c+d x)}dx}{a \left (a^2-b^2\right )}}{2 a \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\left (a^2 C+A b^2\right ) \sin (c+d x)}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}-\frac {\frac {\int \frac {\cos (c+d x) \left (-\left ((2 A-3 C) a^4\right )+11 A b^2 a^2-b \left (A b^2-a^2 (4 A+3 C)\right ) \sec (c+d x) a-6 A b^4+\left (-2 C a^4-b^2 (6 A+C) a^2+3 A b^4\right ) \sec ^2(c+d x)\right )}{a+b \sec (c+d x)}dx}{a \left (a^2-b^2\right )}+\frac {\left (-2 a^4 C-a^2 b^2 (6 A+C)+3 A b^4\right ) \sin (c+d x)}{a d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 a \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\left (a^2 C+A b^2\right ) \sin (c+d x)}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}-\frac {\frac {\int \frac {-\left ((2 A-3 C) a^4\right )+11 A b^2 a^2-b \left (A b^2-a^2 (4 A+3 C)\right ) \csc \left (c+d x+\frac {\pi }{2}\right ) a-6 A b^4+\left (-2 C a^4-b^2 (6 A+C) a^2+3 A b^4\right ) \csc \left (c+d x+\frac {\pi }{2}\right )^2}{\csc \left (c+d x+\frac {\pi }{2}\right ) \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )}dx}{a \left (a^2-b^2\right )}+\frac {\left (-2 a^4 C-a^2 b^2 (6 A+C)+3 A b^4\right ) \sin (c+d x)}{a d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 a \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 4592 |
\(\displaystyle \frac {\left (a^2 C+A b^2\right ) \sin (c+d x)}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}-\frac {\frac {\frac {\left (-\left (a^4 (2 A-3 C)\right )+11 a^2 A b^2-6 A b^4\right ) \sin (c+d x)}{a d}-\frac {\int -\frac {6 A b \left (a^2-b^2\right )^2+a \left (-2 C a^4-b^2 (6 A+C) a^2+3 A b^4\right ) \sec (c+d x)}{a+b \sec (c+d x)}dx}{a}}{a \left (a^2-b^2\right )}+\frac {\left (-2 a^4 C-a^2 b^2 (6 A+C)+3 A b^4\right ) \sin (c+d x)}{a d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 a \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\left (a^2 C+A b^2\right ) \sin (c+d x)}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}-\frac {\frac {\frac {\int \frac {6 A b \left (a^2-b^2\right )^2+a \left (-2 C a^4-b^2 (6 A+C) a^2+3 A b^4\right ) \sec (c+d x)}{a+b \sec (c+d x)}dx}{a}+\frac {\left (-\left (a^4 (2 A-3 C)\right )+11 a^2 A b^2-6 A b^4\right ) \sin (c+d x)}{a d}}{a \left (a^2-b^2\right )}+\frac {\left (-2 a^4 C-a^2 b^2 (6 A+C)+3 A b^4\right ) \sin (c+d x)}{a d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 a \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\left (a^2 C+A b^2\right ) \sin (c+d x)}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}-\frac {\frac {\frac {\int \frac {6 A b \left (a^2-b^2\right )^2+a \left (-2 C a^4-b^2 (6 A+C) a^2+3 A b^4\right ) \csc \left (c+d x+\frac {\pi }{2}\right )}{a+b \csc \left (c+d x+\frac {\pi }{2}\right )}dx}{a}+\frac {\left (-\left (a^4 (2 A-3 C)\right )+11 a^2 A b^2-6 A b^4\right ) \sin (c+d x)}{a d}}{a \left (a^2-b^2\right )}+\frac {\left (-2 a^4 C-a^2 b^2 (6 A+C)+3 A b^4\right ) \sin (c+d x)}{a d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 a \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 4407 |
\(\displaystyle \frac {\left (a^2 C+A b^2\right ) \sin (c+d x)}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}-\frac {\frac {\frac {\frac {\left (-2 a^6 C-a^4 b^2 (12 A+C)+15 a^2 A b^4-6 A b^6\right ) \int \frac {\sec (c+d x)}{a+b \sec (c+d x)}dx}{a}+\frac {6 A b x \left (a^2-b^2\right )^2}{a}}{a}+\frac {\left (-\left (a^4 (2 A-3 C)\right )+11 a^2 A b^2-6 A b^4\right ) \sin (c+d x)}{a d}}{a \left (a^2-b^2\right )}+\frac {\left (-2 a^4 C-a^2 b^2 (6 A+C)+3 A b^4\right ) \sin (c+d x)}{a d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 a \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\left (a^2 C+A b^2\right ) \sin (c+d x)}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}-\frac {\frac {\frac {\frac {\left (-2 a^6 C-a^4 b^2 (12 A+C)+15 a^2 A b^4-6 A b^6\right ) \int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )}{a+b \csc \left (c+d x+\frac {\pi }{2}\right )}dx}{a}+\frac {6 A b x \left (a^2-b^2\right )^2}{a}}{a}+\frac {\left (-\left (a^4 (2 A-3 C)\right )+11 a^2 A b^2-6 A b^4\right ) \sin (c+d x)}{a d}}{a \left (a^2-b^2\right )}+\frac {\left (-2 a^4 C-a^2 b^2 (6 A+C)+3 A b^4\right ) \sin (c+d x)}{a d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 a \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 4318 |
\(\displaystyle \frac {\left (a^2 C+A b^2\right ) \sin (c+d x)}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}-\frac {\frac {\frac {\frac {\left (-2 a^6 C-a^4 b^2 (12 A+C)+15 a^2 A b^4-6 A b^6\right ) \int \frac {1}{\frac {a \cos (c+d x)}{b}+1}dx}{a b}+\frac {6 A b x \left (a^2-b^2\right )^2}{a}}{a}+\frac {\left (-\left (a^4 (2 A-3 C)\right )+11 a^2 A b^2-6 A b^4\right ) \sin (c+d x)}{a d}}{a \left (a^2-b^2\right )}+\frac {\left (-2 a^4 C-a^2 b^2 (6 A+C)+3 A b^4\right ) \sin (c+d x)}{a d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 a \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\left (a^2 C+A b^2\right ) \sin (c+d x)}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}-\frac {\frac {\frac {\frac {\left (-2 a^6 C-a^4 b^2 (12 A+C)+15 a^2 A b^4-6 A b^6\right ) \int \frac {1}{\frac {a \sin \left (c+d x+\frac {\pi }{2}\right )}{b}+1}dx}{a b}+\frac {6 A b x \left (a^2-b^2\right )^2}{a}}{a}+\frac {\left (-\left (a^4 (2 A-3 C)\right )+11 a^2 A b^2-6 A b^4\right ) \sin (c+d x)}{a d}}{a \left (a^2-b^2\right )}+\frac {\left (-2 a^4 C-a^2 b^2 (6 A+C)+3 A b^4\right ) \sin (c+d x)}{a d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 a \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 3138 |
\(\displaystyle \frac {\left (a^2 C+A b^2\right ) \sin (c+d x)}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}-\frac {\frac {\frac {\frac {2 \left (-2 a^6 C-a^4 b^2 (12 A+C)+15 a^2 A b^4-6 A b^6\right ) \int \frac {1}{\left (1-\frac {a}{b}\right ) \tan ^2\left (\frac {1}{2} (c+d x)\right )+\frac {a+b}{b}}d\tan \left (\frac {1}{2} (c+d x)\right )}{a b d}+\frac {6 A b x \left (a^2-b^2\right )^2}{a}}{a}+\frac {\left (-\left (a^4 (2 A-3 C)\right )+11 a^2 A b^2-6 A b^4\right ) \sin (c+d x)}{a d}}{a \left (a^2-b^2\right )}+\frac {\left (-2 a^4 C-a^2 b^2 (6 A+C)+3 A b^4\right ) \sin (c+d x)}{a d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 a \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 221 |
\(\displaystyle \frac {\left (a^2 C+A b^2\right ) \sin (c+d x)}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}-\frac {\frac {\left (-2 a^4 C-a^2 b^2 (6 A+C)+3 A b^4\right ) \sin (c+d x)}{a d \left (a^2-b^2\right ) (a+b \sec (c+d x))}+\frac {\frac {\left (-\left (a^4 (2 A-3 C)\right )+11 a^2 A b^2-6 A b^4\right ) \sin (c+d x)}{a d}+\frac {\frac {6 A b x \left (a^2-b^2\right )^2}{a}+\frac {2 \left (-2 a^6 C-a^4 b^2 (12 A+C)+15 a^2 A b^4-6 A b^6\right ) \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a d \sqrt {a-b} \sqrt {a+b}}}{a}}{a \left (a^2-b^2\right )}}{2 a \left (a^2-b^2\right )}\) |
((A*b^2 + a^2*C)*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) - (((3*A*b^4 - 2*a^4*C - a^2*b^2*(6*A + C))*Sin[c + d*x])/(a*(a^2 - b^2)*d *(a + b*Sec[c + d*x])) + (((6*A*b*(a^2 - b^2)^2*x)/a + (2*(15*a^2*A*b^4 - 6*A*b^6 - 2*a^6*C - a^4*b^2*(12*A + C))*ArcTanh[(Sqrt[a - b]*Tan[(c + d*x) /2])/Sqrt[a + b]])/(a*Sqrt[a - b]*Sqrt[a + b]*d))/a + ((11*a^2*A*b^2 - 6*A *b^4 - a^4*(2*A - 3*C))*Sin[c + d*x])/(a*d))/(a*(a^2 - b^2)))/(2*a*(a^2 - b^2))
3.7.96.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x /Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{ e = FreeFactors[Tan[(c + d*x)/2], x]}, Simp[2*(e/d) Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0]
Int[csc[(e_.) + (f_.)*(x_)]/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbo l] :> Simp[1/b Int[1/(1 + (a/b)*Sin[e + f*x]), x], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 - b^2, 0]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[c*(x/a), x] - Simp[(b*c - a*d)/a Int[Csc[e + f* x]/(a + b*Csc[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Int[((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_. ))*(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a _))^(m_), x_Symbol] :> Simp[(A*b^2 - a*b*B + a^2*C)*Cot[e + f*x]*(a + b*Csc [e + f*x])^(m + 1)*((d*Csc[e + f*x])^n/(a*f*(m + 1)*(a^2 - b^2))), x] + Sim p[1/(a*(m + 1)*(a^2 - b^2)) Int[(a + b*Csc[e + f*x])^(m + 1)*(d*Csc[e + f *x])^n*Simp[a*(a*A - b*B + a*C)*(m + 1) - (A*b^2 - a*b*B + a^2*C)*(m + n + 1) - a*(A*b - a*B + b*C)*(m + 1)*Csc[e + f*x] + (A*b^2 - a*b*B + a^2*C)*(m + n + 2)*Csc[e + f*x]^2, x], x], x] /; FreeQ[{a, b, d, e, f, A, B, C, n}, x ] && NeQ[a^2 - b^2, 0] && LtQ[m, -1] && !(ILtQ[m + 1/2, 0] && ILtQ[n, 0])
Int[((A_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*(csc[(e_.) + (f_.)*(x_)]*(d_. ))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Simp[(A*b ^2 + a^2*C)*Cot[e + f*x]*(a + b*Csc[e + f*x])^(m + 1)*((d*Csc[e + f*x])^n/( a*f*(m + 1)*(a^2 - b^2))), x] + Simp[1/(a*(m + 1)*(a^2 - b^2)) Int[(a + b *Csc[e + f*x])^(m + 1)*(d*Csc[e + f*x])^n*Simp[a^2*(A + C)*(m + 1) - (A*b^2 + a^2*C)*(m + n + 1) - a*b*(A + C)*(m + 1)*Csc[e + f*x] + (A*b^2 + a^2*C)* (m + n + 2)*Csc[e + f*x]^2, x], x], x] /; FreeQ[{a, b, d, e, f, A, C, n}, x ] && NeQ[a^2 - b^2, 0] && LtQ[m, -1] && !(ILtQ[m + 1/2, 0] && ILtQ[n, 0])
Int[((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_. ))*(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a _))^(m_), x_Symbol] :> Simp[A*Cot[e + f*x]*(a + b*Csc[e + f*x])^(m + 1)*((d *Csc[e + f*x])^n/(a*f*n)), x] + Simp[1/(a*d*n) Int[(a + b*Csc[e + f*x])^m *(d*Csc[e + f*x])^(n + 1)*Simp[a*B*n - A*b*(m + n + 1) + a*(A + A*n + C*n)* Csc[e + f*x] + A*b*(m + n + 2)*Csc[e + f*x]^2, x], x], x] /; FreeQ[{a, b, d , e, f, A, B, C, m}, x] && NeQ[a^2 - b^2, 0] && LeQ[n, -1]
Time = 0.75 (sec) , antiderivative size = 329, normalized size of antiderivative = 1.24
method | result | size |
derivativedivides | \(\frac {-\frac {2 A \left (-\frac {a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}+3 b \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )\right )}{a^{4}}-\frac {2 \left (\frac {-\frac {\left (8 A \,a^{2} b^{2}+a A \,b^{3}-4 A \,b^{4}+4 a^{4} C +a^{3} b C \right ) a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{2 \left (a -b \right ) \left (a^{2}+2 a b +b^{2}\right )}+\frac {\left (8 A \,a^{2} b^{2}-a A \,b^{3}-4 A \,b^{4}+4 a^{4} C -a^{3} b C \right ) a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 \left (a +b \right ) \left (a^{2}-2 a b +b^{2}\right )}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b -a -b \right )^{2}}-\frac {\left (12 A \,a^{4} b^{2}-15 a^{2} A \,b^{4}+6 A \,b^{6}+2 a^{6} C +a^{4} b^{2} C \right ) \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{2 \left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) \sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{a^{4}}}{d}\) | \(329\) |
default | \(\frac {-\frac {2 A \left (-\frac {a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}+3 b \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )\right )}{a^{4}}-\frac {2 \left (\frac {-\frac {\left (8 A \,a^{2} b^{2}+a A \,b^{3}-4 A \,b^{4}+4 a^{4} C +a^{3} b C \right ) a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{2 \left (a -b \right ) \left (a^{2}+2 a b +b^{2}\right )}+\frac {\left (8 A \,a^{2} b^{2}-a A \,b^{3}-4 A \,b^{4}+4 a^{4} C -a^{3} b C \right ) a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 \left (a +b \right ) \left (a^{2}-2 a b +b^{2}\right )}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b -a -b \right )^{2}}-\frac {\left (12 A \,a^{4} b^{2}-15 a^{2} A \,b^{4}+6 A \,b^{6}+2 a^{6} C +a^{4} b^{2} C \right ) \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{2 \left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) \sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{a^{4}}}{d}\) | \(329\) |
risch | \(\text {Expression too large to display}\) | \(1228\) |
1/d*(-2/a^4*A*(-a*tan(1/2*d*x+1/2*c)/(1+tan(1/2*d*x+1/2*c)^2)+3*b*arctan(t an(1/2*d*x+1/2*c)))-2/a^4*((-1/2*(8*A*a^2*b^2+A*a*b^3-4*A*b^4+4*C*a^4+C*a^ 3*b)*a*b/(a-b)/(a^2+2*a*b+b^2)*tan(1/2*d*x+1/2*c)^3+1/2*(8*A*a^2*b^2-A*a*b ^3-4*A*b^4+4*C*a^4-C*a^3*b)*a*b/(a+b)/(a^2-2*a*b+b^2)*tan(1/2*d*x+1/2*c))/ (tan(1/2*d*x+1/2*c)^2*a-tan(1/2*d*x+1/2*c)^2*b-a-b)^2-1/2*(12*A*a^4*b^2-15 *A*a^2*b^4+6*A*b^6+2*C*a^6+C*a^4*b^2)/(a^4-2*a^2*b^2+b^4)/((a+b)*(a-b))^(1 /2)*arctanh((a-b)*tan(1/2*d*x+1/2*c)/((a+b)*(a-b))^(1/2))))
Leaf count of result is larger than twice the leaf count of optimal. 581 vs. \(2 (247) = 494\).
Time = 0.34 (sec) , antiderivative size = 1219, normalized size of antiderivative = 4.58 \[ \int \frac {\cos (c+d x) \left (A+C \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^3} \, dx=\text {Too large to display} \]
[-1/4*(12*(A*a^8*b - 3*A*a^6*b^3 + 3*A*a^4*b^5 - A*a^2*b^7)*d*x*cos(d*x + c)^2 + 24*(A*a^7*b^2 - 3*A*a^5*b^4 + 3*A*a^3*b^6 - A*a*b^8)*d*x*cos(d*x + c) + 12*(A*a^6*b^3 - 3*A*a^4*b^5 + 3*A*a^2*b^7 - A*b^9)*d*x - (2*C*a^6*b^2 + (12*A + C)*a^4*b^4 - 15*A*a^2*b^6 + 6*A*b^8 + (2*C*a^8 + (12*A + C)*a^6 *b^2 - 15*A*a^4*b^4 + 6*A*a^2*b^6)*cos(d*x + c)^2 + 2*(2*C*a^7*b + (12*A + C)*a^5*b^3 - 15*A*a^3*b^5 + 6*A*a*b^7)*cos(d*x + c))*sqrt(a^2 - b^2)*log( (2*a*b*cos(d*x + c) - (a^2 - 2*b^2)*cos(d*x + c)^2 + 2*sqrt(a^2 - b^2)*(b* cos(d*x + c) + a)*sin(d*x + c) + 2*a^2 - b^2)/(a^2*cos(d*x + c)^2 + 2*a*b* cos(d*x + c) + b^2)) - 2*((2*A - 3*C)*a^7*b^2 - (13*A - 3*C)*a^5*b^4 + 17* A*a^3*b^6 - 6*A*a*b^8 + 2*(A*a^9 - 3*A*a^7*b^2 + 3*A*a^5*b^4 - A*a^3*b^6)* cos(d*x + c)^2 + (4*(A - C)*a^8*b - 5*(4*A - C)*a^6*b^3 + (25*A - C)*a^4*b ^5 - 9*A*a^2*b^7)*cos(d*x + c))*sin(d*x + c))/((a^12 - 3*a^10*b^2 + 3*a^8* b^4 - a^6*b^6)*d*cos(d*x + c)^2 + 2*(a^11*b - 3*a^9*b^3 + 3*a^7*b^5 - a^5* b^7)*d*cos(d*x + c) + (a^10*b^2 - 3*a^8*b^4 + 3*a^6*b^6 - a^4*b^8)*d), -1/ 2*(6*(A*a^8*b - 3*A*a^6*b^3 + 3*A*a^4*b^5 - A*a^2*b^7)*d*x*cos(d*x + c)^2 + 12*(A*a^7*b^2 - 3*A*a^5*b^4 + 3*A*a^3*b^6 - A*a*b^8)*d*x*cos(d*x + c) + 6*(A*a^6*b^3 - 3*A*a^4*b^5 + 3*A*a^2*b^7 - A*b^9)*d*x - (2*C*a^6*b^2 + (12 *A + C)*a^4*b^4 - 15*A*a^2*b^6 + 6*A*b^8 + (2*C*a^8 + (12*A + C)*a^6*b^2 - 15*A*a^4*b^4 + 6*A*a^2*b^6)*cos(d*x + c)^2 + 2*(2*C*a^7*b + (12*A + C)*a^ 5*b^3 - 15*A*a^3*b^5 + 6*A*a*b^7)*cos(d*x + c))*sqrt(-a^2 + b^2)*arctan...
\[ \int \frac {\cos (c+d x) \left (A+C \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^3} \, dx=\int \frac {\left (A + C \sec ^{2}{\left (c + d x \right )}\right ) \cos {\left (c + d x \right )}}{\left (a + b \sec {\left (c + d x \right )}\right )^{3}}\, dx \]
Exception generated. \[ \int \frac {\cos (c+d x) \left (A+C \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^3} \, dx=\text {Exception raised: ValueError} \]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*a^2-4*b^2>0)', see `assume?` f or more de
Time = 0.38 (sec) , antiderivative size = 491, normalized size of antiderivative = 1.85 \[ \int \frac {\cos (c+d x) \left (A+C \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^3} \, dx=\frac {\frac {{\left (2 \, C a^{6} + 12 \, A a^{4} b^{2} + C a^{4} b^{2} - 15 \, A a^{2} b^{4} + 6 \, A b^{6}\right )} {\left (\pi \left \lfloor \frac {d x + c}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (-2 \, a + 2 \, b\right ) + \arctan \left (-\frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\sqrt {-a^{2} + b^{2}}}\right )\right )}}{{\left (a^{8} - 2 \, a^{6} b^{2} + a^{4} b^{4}\right )} \sqrt {-a^{2} + b^{2}}} - \frac {3 \, {\left (d x + c\right )} A b}{a^{4}} + \frac {4 \, C a^{5} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 3 \, C a^{4} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 8 \, A a^{3} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - C a^{3} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 7 \, A a^{2} b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 5 \, A a b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 4 \, A b^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 4 \, C a^{5} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 3 \, C a^{4} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 8 \, A a^{3} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + C a^{3} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 7 \, A a^{2} b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 5 \, A a b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 4 \, A b^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (a^{7} - 2 \, a^{5} b^{2} + a^{3} b^{4}\right )} {\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a - b\right )}^{2}} + \frac {2 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )} a^{3}}}{d} \]
((2*C*a^6 + 12*A*a^4*b^2 + C*a^4*b^2 - 15*A*a^2*b^4 + 6*A*b^6)*(pi*floor(1 /2*(d*x + c)/pi + 1/2)*sgn(-2*a + 2*b) + arctan(-(a*tan(1/2*d*x + 1/2*c) - b*tan(1/2*d*x + 1/2*c))/sqrt(-a^2 + b^2)))/((a^8 - 2*a^6*b^2 + a^4*b^4)*s qrt(-a^2 + b^2)) - 3*(d*x + c)*A*b/a^4 + (4*C*a^5*b*tan(1/2*d*x + 1/2*c)^3 - 3*C*a^4*b^2*tan(1/2*d*x + 1/2*c)^3 + 8*A*a^3*b^3*tan(1/2*d*x + 1/2*c)^3 - C*a^3*b^3*tan(1/2*d*x + 1/2*c)^3 - 7*A*a^2*b^4*tan(1/2*d*x + 1/2*c)^3 - 5*A*a*b^5*tan(1/2*d*x + 1/2*c)^3 + 4*A*b^6*tan(1/2*d*x + 1/2*c)^3 - 4*C*a ^5*b*tan(1/2*d*x + 1/2*c) - 3*C*a^4*b^2*tan(1/2*d*x + 1/2*c) - 8*A*a^3*b^3 *tan(1/2*d*x + 1/2*c) + C*a^3*b^3*tan(1/2*d*x + 1/2*c) - 7*A*a^2*b^4*tan(1 /2*d*x + 1/2*c) + 5*A*a*b^5*tan(1/2*d*x + 1/2*c) + 4*A*b^6*tan(1/2*d*x + 1 /2*c))/((a^7 - 2*a^5*b^2 + a^3*b^4)*(a*tan(1/2*d*x + 1/2*c)^2 - b*tan(1/2* d*x + 1/2*c)^2 - a - b)^2) + 2*A*tan(1/2*d*x + 1/2*c)/((tan(1/2*d*x + 1/2* c)^2 + 1)*a^3))/d
Time = 26.73 (sec) , antiderivative size = 7202, normalized size of antiderivative = 27.08 \[ \int \frac {\cos (c+d x) \left (A+C \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^3} \, dx=\text {Too large to display} \]
((tan(c/2 + (d*x)/2)*(2*A*a^5 + 6*A*b^5 - 12*A*a^2*b^3 - 4*A*a^3*b^2 + C*a ^3*b^2 + 3*A*a*b^4 + 2*A*a^4*b - 4*C*a^4*b))/((a + b)*(a^5 - 2*a^4*b + a^3 *b^2)) - (tan(c/2 + (d*x)/2)^5*(2*A*a^5 - 6*A*b^5 + 12*A*a^2*b^3 - 4*A*a^3 *b^2 + C*a^3*b^2 + 3*A*a*b^4 - 2*A*a^4*b + 4*C*a^4*b))/((a^3*b - a^4)*(a + b)^2) + (2*tan(c/2 + (d*x)/2)^3*(2*A*a^6 - 6*A*b^6 + 13*A*a^2*b^4 - 6*A*a ^4*b^2 + 3*C*a^4*b^2))/(a*(a^2*b - a^3)*(a + b)^2*(a - b)))/(d*(2*a*b + ta n(c/2 + (d*x)/2)^2*(2*a*b - a^2 + 3*b^2) + tan(c/2 + (d*x)/2)^6*(a^2 - 2*a *b + b^2) + a^2 + b^2 - tan(c/2 + (d*x)/2)^4*(2*a*b + a^2 - 3*b^2))) - (6* A*b*atan(((3*A*b*((8*tan(c/2 + (d*x)/2)*(72*A^2*b^12 + 4*C^2*a^12 - 72*A^2 *a*b^11 - 288*A^2*a^2*b^10 + 288*A^2*a^3*b^9 + 441*A^2*a^4*b^8 - 432*A^2*a ^5*b^7 - 288*A^2*a^6*b^6 + 288*A^2*a^7*b^5 + 36*A^2*a^8*b^4 - 72*A^2*a^9*b ^3 + 36*A^2*a^10*b^2 + C^2*a^8*b^4 + 4*C^2*a^10*b^2 + 12*A*C*a^4*b^8 - 6*A *C*a^6*b^6 - 36*A*C*a^8*b^4 + 48*A*C*a^10*b^2))/(a^12*b + a^13 - a^6*b^7 - a^7*b^6 + 3*a^8*b^5 + 3*a^9*b^4 - 3*a^10*b^3 - 3*a^11*b^2) + (A*b*((8*(4* C*a^18 + 12*A*a^8*b^10 - 6*A*a^9*b^9 - 54*A*a^10*b^8 + 24*A*a^11*b^7 + 96* A*a^12*b^6 - 42*A*a^13*b^5 - 78*A*a^14*b^4 + 36*A*a^15*b^3 + 24*A*a^16*b^2 - 2*C*a^11*b^7 + 2*C*a^12*b^6 + 6*C*a^15*b^3 - 6*C*a^16*b^2 - 12*A*a^17*b - 4*C*a^17*b))/(a^15*b + a^16 - a^9*b^7 - a^10*b^6 + 3*a^11*b^5 + 3*a^12* b^4 - 3*a^13*b^3 - 3*a^14*b^2) - (A*b*tan(c/2 + (d*x)/2)*(8*a^17*b - 8*a^8 *b^10 + 8*a^9*b^9 + 32*a^10*b^8 - 32*a^11*b^7 - 48*a^12*b^6 + 48*a^13*b...